package com.bean;

import com.annotation.Hello;

/**
 * @author Cc
 * 2024-04-02
 */
public class Cat extends Animal {
    @Override
    public void eat() {
        super.eat();
    }

    @Deprecated
    public void catchMouse() {
        if (this.getClass().isAnnotationPresent(Hello.class)) {
            System.out.println("不会抓老鼠");
            return;
        }
        System.out.println("抓老鼠");
    }
}
